package net.vanchu.mortgagecalculator.mortgage.data.loan;

/**
 * 组合贷款
 * <p/>
 * Created by Granton on 2016/12/14.
 */
public class MixLoan extends AbsLoan implements WithCommercial, WithProvidentFund {

    private double principalCom;

    private double rateCom;

    private double discountCom;

    private double principalPro;

    private double ratePro;

    private double discountPro;

    public MixLoan(int year,
                   double principalCom, double rateCom, double discountCom,
                   double principalPro, double ratePro, double discountPro) {
        super(year);
        this.principalCom = principalCom;
        this.rateCom = rateCom;
        this.discountCom = discountCom;
        this.principalPro = principalPro;
        this.ratePro = ratePro;
        this.discountPro = discountPro;
    }

    @Override
    public double getCommercialPrincipal() {
        return principalCom;
    }

    @Override
    public double getProvidentFundPrincipal() {
        return principalPro;
    }

    @Override
    public double getCommercialInterestRate() {
        return rateCom;
    }

    @Override
    public double getProvidentFundInterestRate() {
        return ratePro;
    }

    @Override
    public double getCommercialDiscount() {
        return discountCom;
    }

    @Override
    public double getProvidentFundDiscount() {
        return discountPro;
    }
}